﻿using Microsoft.SharePoint.Client;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Albatross.SharePoint.Explorer.ViewModels {
	public class FeatureViewModel : ClientObjectViewModel {
		public FeatureViewModel(ClientContext context, string name, Feature feature) : base(context, name, feature) { }
		public Feature Feature { get { return (Feature)ClientObject; } }

		public override string GetTreeItemTitle() {
			if (Name == string.Empty) {
				return Convert.ToString(Feature.DefinitionId);
			} else {
				return Name;
			}
		}
	}
}
